package com.bdcom.nms.NmsCollect.pojo;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * MO对象用于封装设备
 * @author HP
 *
 */
/**
 *JPA注解
 */
@Entity
@Table(name="ManagedObject")
public class ManagedObject {
   
	
	@Override
	public String toString() {
		return "ManagedObject [moid=" + moid + ", name=" + name + ", classname=" + classname + ", type=" + type
				+ ", topobj=" + topoobject + "]";
	}

	@Id
	private long moid;

	private String name;

	private String classname;
	
	private String type;
	
	@OneToOne(cascade=CascadeType.ALL,optional=false)
	@JoinColumn(name="moid",	referencedColumnName="moid",unique=true)
	private TopoObject topoobject;

	public long getMoid() {
		return moid;
	}

	public void setMoid(long moid) {
		this.moid = moid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public TopoObject getTopoobject() {
		return topoobject;
	}

	public void setTopoobject(TopoObject topoobject) {
		this.topoobject = topoobject;
	}

	public String getClassname() {
		return classname;
	}

	public void setClassname(String classname) {
		this.classname = classname;
	}


}
